package com.khyr.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.khyr.entity.Role;
import com.khyr.vo.R;
import com.khyr.vo.RoleVo;

import java.util.List;

/**
 * @author 宋一恒
 * @version 1.0
 */
public interface RoleService {
    R<List<Role>> selectAllRole();

    R<Role> findRolesByUserId(Long userId);

    R<Page<Role>> findRoleByCond(RoleVo roleVo);

    R<Integer> addRole(Role role);

    R<Integer> updateRole(Role role);

    R<Integer> deleteRoleByRoleIds(List<Long> ids);

    R<Role> getRoleByRoleId(Long id);

    R<Integer> saveRoleUser(Long userId, List<Long> roleIds);

    R<Integer> saveRoleMenu(Long roleId, List<Long> menuIds);
}
